package net.huanger.gametools.mapeditor;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;

import net.huanger.gametools.mapeditor.ui.MapEditorMenuBar;
import net.huanger.gametools.mapeditor.ui.MapEditorPanel;

public class Main
{
  public static void main(String[] args)
  {
    SwingUtilities.invokeLater(new Runnable()
      {
        
        @Override
        public void run()
        {
          try
          {
            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
          }
          catch (Exception e)
          {
            e.printStackTrace();
          }
          
          JFrame frame=new JFrame();
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setLayout(new BorderLayout());
          MapEditorPanel comp = new MapEditorPanel();
          frame.add(comp,BorderLayout.CENTER);
          
          frame.setJMenuBar(new  MapEditorMenuBar(comp));
          frame.setSize(600,600);
          frame.setLocationRelativeTo(null);
          frame.setVisible(true);
        }
      });
  }
}
